package com.zhuhjay.common.config;

import com.zhuhjay.common.properties.LoggingSystemProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;

/**
 * @author ZhuHJay
 * @date 2022/3/20 16:00
 */
@Configuration
public class GlobalConfiguration {

    /** 开启 @Validate 注解, 提供参数校验功能 **/
    @Bean
    public MethodValidationPostProcessor methodValidationPostProcessor(){
        return new MethodValidationPostProcessor();
    }

    /** 系统配置文件映射 **/
    @Bean
    public LoggingSystemProperties loggingSystemProperties(){
        return new LoggingSystemProperties();
    }

}
